package com.wpp.Test;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

public class test1 implements BeanPostProcessor {

    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        return null;
    }

    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {

        BeanProcessorTest beanProcessorTest =  (BeanProcessorTest)bean;
        beanProcessorTest.setName("小明");
        return beanProcessorTest;
    }


}
